<style type="text/css">
.detail_info .detail_content .info_data .info .title .right .div-btn a {
    display: block;
}

#viewDiv .btn {
    padding: 0px 8px;
    color: #fff !important;
    background-color: #ff8903;
    border-radius: 2px !important;
}

.right-pic {
    width: 100%;
    padding-right: 10px;
    text-align: right;
}

.control-label {
    font-weight: 600;
}

.modal-content .form-group .row {
    padding-top: 14px;
    height: 60px;
    margin-top: 0px;
}

.have-bg {
    background: #f8f8f8;
}

.modal-content .input-group {
    padding-top: 2px;
}

.modal-content .modal-footer {
    margin-top: 20px;
}

.modal-dialog {
    width: 1000px;
}

.detail_info .detail_content .info_data .info .content ul li div {
    float: left;
    width: 50%;
}

.setpopup {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    min-width: 160px;
    padding: 12px 16px;
    z-index: 999;
    line-height: 30px;
    text-align: center;
    left: -92px;
    top: 70px;
}

.setpopup:hover .dropdown-content {
    display: block;
}

.table_btn_box {
    margin-bottom: 5px;
}

.charger-paddingLeft {
    padding-left: 0;
}

.ref {
    position: absolute;
    top: 25px;
    right: 20px;
    background-color: #009fcd;
    padding: 7px 20px;
    border: 0;
    color: #fff;
}

.ref:hover {
    background-color: #357ebd;
}

.word-wrap {
    word-wrap: break-word;
}

.word-wrap .fontThick {
    font-weight: 400;
}

#snIfame {
    padding: 0px 2px;
    position: absolute;
    top: 30px;
    left: 110px;
    border: 1px solid black;
    display: none;
    background: #fff;
    text-align: center;
    height: 20px;
    line-height: 20px;
    color: #000
}
</style>
<div class="pull-right">
    <input class="ref" type="button" value="刷新" ng-click="refreshdetail();">
</div>
<div class="info_data">
    <div class="info">
        <div class="title">
            <div class="left">
                <span>电桩信息</span>
            </div>
            <div class="right-pic">
                <a href="javascript:;" data-target="#DCPileModel" data-toggle="modal" ng-click="updatePile();">修改电桩</a>
                <a ng-if="commonChargeDetail.protocol_version=='0201'" href="javascript:;" data-target="#offlineWhiteList" data-toggle="modal" ng-click="whitelistManage(DCP);">白名单管理</a>
                <a href="javascript:;" data-target="#splitratioSchemeList" data-toggle="modal" ng-click="splitratioSchemeManage(commonChargeDetail.charger_id);">分成管理</a>
                <a href="javascript:;" ng-click="deleteDCPile(commonChargeDetail.charger_id);">删除</a>
                <div class="setpopup">
                    <a>下发指令</a>
                    <ul class="dropdown-content">
                        <li><a href="javascript:;" ng-click="sendChargerRate(commonChargeDetail.charger_id);">下发费率</a></li>
                        <li ng-if="commonChargeDetail.protocol_version=='0201' || commonChargeDetail.protocol_version=='0101' || commonChargeDetail.protocol_version=='0102'"><a  ng-click="retrieveChargingFee(commonChargeDetail.charger_id,commonChargeDetail.protocol_version)">查询充电费率</a></li>
                        <li ng-if="commonChargeDetail.protocol_version=='0201'"><a ng-click="retrieveServiceFee(commonChargeDetail.charger_id)">查询服务费率</a></li>
                        <li><a href="javascript:;" ng-click="restartCharger(commonChargeDetail.charger_id);">重启电桩</a></li>
                        <li ng-if="commonChargeDetail.protocol_version=='0201'"><a ng-click="queryUserId(commonChargeDetail.charger_id);">查询卡号</a></li>
                        <li ng-if="commonChargeDetail.protocol_version=='0201'"><a ng-click="findChargerStatus(commonChargeDetail.charger_id);">查桩状态</a></li>
                        <li><a data-target="#chargerStatus" data-toggle="modal">状态设置</a></li>
                        <li><a ng-click="setIdentification(commonChargeDetail.charger_id)">设置标识</a></li>
                        <li ng-if="commonChargeDetail.protocol_version=='0201'"><a ng-click="findIdentification(commonChargeDetail.charger_id);">查询标识</a></li>
                        <li ng-if="commonChargeDetail.protocol_version=='0201'"><a ng-click="retrieveQrCode(commonChargeDetail.charger_id);">查二维码</a></li>
                    </ul>
                </div>
            </div>
            <div class="cb"></div>
        </div>
        <div class="content">
            <ul class="ul_one">
                <li>
                    <div>
                        <b><span>电桩ID：</span></b>
                        <span ng-bind="commonChargeDetail.charger_id"></span>
                    </div>
                    <div>
                        <b><span>站内编号：</span></b>
                        <span ng-bind="commonChargeDetail.serial_no"></span>
                    </div>
                </li>
                <li>
                    <div id="viewDiv">
                        <b><span>二维码：</span></b>
                        <span ng-bind="commonChargeDetail.qr_code"></span>
                        <a class="btn" href="javascript:;" ng-click="generateQrCode();">
                                                        {{commonChargeDetail.qr_code==null?"生成二维码":"重新生成并下发"}}
                                                        </a>
                        <a class="btn" ng-click="sendQrCode(commonChargeDetail.charger_id);">{{commonChargeDetail.qr_code==null?"":"下发原有二维码"}}</a>
                    </div>
                    <div>
                        <b><span>品牌：</span></b>
                        <span ng-bind="commonChargeDetail.brand"></span>
                    </div>
                </li>
                <li>
                    <div class="word-wrap" style="position: relative;">
                        <b ng-if="commonChargeDetail.dev_sn.length>15"><span>SN：<span ng-bind="commonChargeDetail.dev_snSlice" onmouseover="show()" onmouseleave="hide()" class="fontThick"></span></span></b>
                        <b ng-if="commonChargeDetail.dev_sn.length<=15"><span>SN：<span ng-bind="commonChargeDetail.dev_sn" onmouseover="show()" onmouseleave="hide()" class="fontThick"></span></span></b>
                        <a id="snIfame" ng-bind="commonChargeDetail.dev_sn"></a>
                        <script type="text/javascript">
                        var hide = function() {
                            var o = document.getElementById('snIfame');
                            o.style.display = 'none';
                        }
                        var show = function() {
                            var e = document.getElementById('snIfame');
                            e.style.display = 'block';
                        }
                        </script>
                    </div>
                    <div>
                        <b><span>生产商：</span></b>
                        <span ng-bind="commonChargeDetail.factory_name"></span>
                    </div>
                </li>
                <li>
                    <div>
                        <b><span>充电运营服务商：</span></b>
                        <span ng-bind="commonChargeDetail.operName"></span>
                    </div>
                    <div>
                        <b><span>合作商：</span></b>
                        <span ng-bind="commonChargeDetail.entityName"></span>
                    </div>
                </li>
                <li>
                    <div>
                        <b><span>软件版本：</span></b>
                        <span ng-bind="commonChargeDetail.software_version"></span>
                    </div>
                    <div>
                        <b><span>允许桩生成费用：</span></b>
                        <span ng-if="commonChargeDetail.protocol_version!=='0102'&&commonChargeDetail.protocol_version!=='0101'" ng-bind="commonChargeDetail.is_allow_generate_fee | getValueInStaticFilter : 'whetherArray'"></span>
                        <span ng-if="commonChargeDetail.protocol_version =='0102'||commonChargeDetail.protocol_version =='0101'">是</span>
                    </div>
                </li>
                <li>
                    <div>
                        <b><span>安装时间：</span></b>
                        <span ng-bind="commonChargeDetail.installation_time | date:'yyyy-MM-dd'"></span>
                    </div>
                    <div>
                        <b><span>WIFI编号：</span></b>
                        <span ng-bind="commonChargeDetail.card_wifi"></span>
                    </div>
                </li>
                <li>
                    <div id="viewDiv">
                        <b><span>预约费费率方案</span></b>
                        <a class="btn" href="javascript:;" data-target="#chargerRateModel" data-toggle="modal" ng-click="viewChargerRateForCharger(commonChargeDetail.rate_schema_bespeak_fee);" ng-if="!!commonChargeDetail.rate_schema_bespeak_fee&&'0'!=commonChargeDetail.rate_schema_bespeak_fee">
                                                        查看
                                                        </a>
                        <a class="btn" href="javascript:;" data-target="#chargerRateList" data-toggle="modal" ng-click="chargerRateManage('1');">
                                                        绑定管理
                                                        </a>
                    </div>
                    <div id="viewDiv">
                        <b><span>电费费率方案</span></b>
                        <a class="btn" href="javascript:;" data-target="#chargerRateModel" data-toggle="modal" ng-click="viewChargerRateForCharger(commonChargeDetail.rate_schema_charge_fee);" ng-if="!!commonChargeDetail.rate_schema_charge_fee&&'0'!=commonChargeDetail.rate_schema_charge_fee">
                                                        查看
                                                        </a>
                        <a class="btn" href="javascript:;" data-target="#chargerRateList" data-toggle="modal" ng-click="chargerRateManage('2');">
                                                        绑定管理
                                                        </a>
                    </div>
                </li>
                <li>
                    <div id="viewDiv">
                        <b><span>服务费费率方案</span></b>
                        <a class="btn" href="javascript:;" data-target="#chargerRateModel" data-toggle="modal" ng-click="viewChargerRateForCharger(commonChargeDetail.rate_schema_service_fee);" ng-if="!!commonChargeDetail.rate_schema_service_fee&&'0'!=commonChargeDetail.rate_schema_service_fee">
                                                        查看
                                                        </a>
                        <a class="btn" href="javascript:;" data-target="#chargerRateList" data-toggle="modal" ng-click="chargerRateManage('3');">
                                                        绑定管理
                                                        </a>
                    </div>
                    <div id="viewDiv">
                        <b><span>硬件服务器</span></b>
                        <a class="btn" href="javascript:;" data-target="#dicForwardSrvModel" data-toggle="modal" ng-click="viewDicForwardSrv(commonChargeDetail.omsDicForwardSrvInfo);" ng-if="!!commonChargeDetail.forward_srv_id">
                                                        查看
                                                        </a>
                        <a class="btn" href="javascript:;" data-target="#dicForwardSrvList" data-toggle="modal" ng-click="dicForwardSrvManage();">
                                                        绑定管理
                                                        </a>
                    </div>
                </li>
                <li>
                    <div id="viewDiv" style="width: 100%;">
                        <b><span>分成方案</span></b>
                        <a class="btn" href="javascript:;" data-target="#splitratioSchemeModel" data-toggle="modal" ng-click="viewSplitratioScheme(omsSplitratioScheme);" ng-repeat="omsSplitratioScheme in commonChargeDetail.omsSplitratioSchemeList">
                                                        {{omsSplitratioScheme.scheme_name}}
                                                        </a>
                    </div>
                </li>
                <li>
                    <div id="viewDiv">
                        <b><span>站点信息</span></b>
                        <a class="btn" href="javascript:;" data-target="#stationModel" data-toggle="modal" ng-click="viewStationForCharger(commonChargeDetail.station_id);" ng-if="!!commonChargeDetail.station_id">
                                                        查看
                                                        </a>
                        <a class="btn" href="javascript:;" data-target="#stationList" data-toggle="modal" ng-click="stationManage(commonChargeDetail.oper_merchant_id);">
                                                        绑定管理
                                                        </a>
                    </div>
                </li>
            </ul>
        </div>
    </div>
    <charge-data-summary charger-id="chargerId">
    </charge-data-summary>
    <div class="cb"></div>
</div>
<div id="chargerStatus" class="modal fade" role="dialog" aria-hidden="true" data-backdrop="false">
    <div class="modal-dialog" style="width:400px">
        <form class="w5c-form demo-form" role="form" w5c-form-validate="vm.validateOptions" novalidate name="validateForm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h4 class="modal-title">电桩状态设置</h4>
                </div>
                <div class="modal-body form">
                    <div class="form-group">
                        <label class="charger-paddingLeft col-sm-12">设置电桩状态</label>
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="input-group">
                                    <select class="form-control" ng-model="chargerState" required="" name="chargerState">
                                        <option value="">请选择</option>
                                        <option value="01" selected="selected">空闲</option>
                                        <option value="02">预约</option>
                                        <option value="03">充电</option>
                                        <option value="04">刷卡</option>
                                        <option value="05">电桩故障</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
        </form>
        <div style="clear: both;"></div>
        <div class="modal-footer">
            <button type="button" class="btn btn-danger" data-dismiss="modal"> <i class="fa fa-times"></i> 关闭
            </button>
            <button type="button" class="btn btn-primary" w5c-form-submit="setChargerStatus(commonChargeDetail.charger_id)"> <i class="fa fa-check"></i> 设置
            </button>
        </div>
        </div>
    </div>
</div>
<div id="DCPileModel" class="modal fade" role="dialog" aria-hidden="true" data-backdrop="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <form class="w5c-form demo-form" role="form" w5c-form-validate="vm.validateOptions" novalidate name="validateForm">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true" onclick="validReset();">×</button>
                    <h4 class="modal-title">电桩信息修改</h4>
                </div>
                <div class="modal-body form">
                    <div class="form-group">
                        <div class="row">
                            <label class="col-sm-2 control-label text-right"><span class="star-color"></span>运营二维码</label>
                            <div class="col-sm-4">
                                <div class="input-group">
                                    <input type="text" class="form-control validInput" ng-model="modifyPileInfo.qr_code" ng-readonly="true" name="qr_code" />
                                </div>
                            </div>
                            <label class="col-sm-2 control-label text-right"><span class="star-color"></span>WIFI编号</label>
                            <div class="col-sm-4">
                                <div class="input-group">
                                    <input type="text" class="form-control validInput" ng-model="modifyPileInfo.card_wifi" name="card_wifi" ng-maxlength="20" />
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-sm-2 control-label text-right"><span class="star-color">* </span>充电运营服务商</label>
                            <div class="col-sm-4">
                                <div class="input-group">
                                    <select class="form-control validInput" ng-options="operMechant.oper_merchant_id as operMechant.oper_name for operMechant in operMechantList " ng-model="modifyPileInfo.oper_merchant_id" required="" name="oper_merchant_id">
                                        <option value="">请选择服务商</option>
                                    </select>
                                </div>
                            </div>
                            <label class="col-sm-2 control-label text-right"><span class="star-color"></span>合作商</label>
                            <div class="col-sm-4">
                                <div class="input-group">
                                    <select class="form-control validInput" ng-options="merchant.merchant_id as merchant.name for merchant in merchantList " ng-model="modifyPileInfo.entity_id" id="selectEntity" name="entity_id">
                                        <option value="">请选择商户</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-sm-2 control-label text-right"><span class="star-color"></span>加密方式</label>
                            <div class="col-sm-4">
                                <div class="input-group">
                                    <select class="form-control validInput" ng-model="modifyPileInfo.encrypt_type" name="encrypt_type">
                                        <option value="">请选择加密方式</option>
                                        <option value="0">不加密</option>
                                        <option value="1">DES</option>
                                        <option value="2">3DES</option>
                                        <option value="3">AES</option>
                                        <option value="4">MD5</option>
                                    </select>
                                </div>
                            </div>
                            <div ng-if="!!modifyPileInfo.encrypt_type&&modifyPileInfo.encrypt_type!='0'">
                                <label class="col-sm-2 control-label text-right"><span class="star-color"></span>通信密钥</label>
                                <div class="col-sm-4">
                                    <div class="input-group">
                                        <input type="text" class="form-control validInput" ng-model="modifyPileInfo.comm_key" name="comm_key" w5c-dynamic-element ng-maxlength="50" />
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div style="clear: both;"></div>
                        <!--                                     <div class="row">
                                      <label class="col-sm-2 control-label text-right">通讯协议类型</label>
                                      <div class="col-sm-4">
                                        <div class="input-group">
                                          <select class="form-control" ng-model="modifyPileInfo.protocol_type" required="" name="protocol_type">
                                            <option value="">请选择通讯协议类型</option>
                                            <option value="1">EV3C</option>
                                            <option value="2">Protocol Translate</option>
                                            <option value="3">P2P</option>
                                          </select>
                                        </div>
                                      </div>
                                      <label class="col-sm-2 control-label text-right">通讯协议版本号</label>
                                      <div class="col-sm-4">
                                        <div class="input-group">
                                          <input type="text" class="form-control" ng-model="modifyPileInfo.protocol_version"/>
                                        </div>
                                      </div>
                                    </div> -->
                        <div class="row">
                            <label class="col-sm-2 control-label text-right"><span class="star-color">* </span>安装时间</label>
                            <div class="col-sm-4">
                                <div class="input-group">
                                    <input type="text" class="form-control getTime validInput" ng-model="modifyPileInfo.installation_time" name="installation_time" required="" ng-readonly="true" />
                                </div>
                            </div>
                            <label class="col-sm-2 control-label text-right"><span class="star-color">* </span>允许桩生成费用</label>
                            <div class="col-sm-4">
                                <div class="input-group">
                                    <select ng-if="commonChargeDetail.protocol_version!=='0102'&&commonChargeDetail.protocol_version!=='0101'" class="form-control validInput" ng-model="modifyPileInfo.is_allow_generate_fee" required="" name="is_allow_generate_fee">
                                        <option value="">请选择允许桩生成费用</option>
                                        <option value="1">是</option>
                                        <option value="0">否</option>
                                    </select>
                                    <input ng-if="commonChargeDetail.protocol_version =='0102'||commonChargeDetail.protocol_version =='0101'" class="form-control" value="是" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-sm-2 control-label text-right">站内编号</label>
                            <div class="col-sm-4">
                                <input class="form-control" ng-model="commonChargeDetail.serial_no">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-danger" data-dismiss="modal" onclick="validReset();"> <i class="fa fa-times"></i> 关闭
                    </button>
                    <button w5c-form-submit="modifyPile();" type="button" class="btn btn-primary"> <i class="fa fa-check"></i> 保存
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
<div id="offlineWhiteList" class="modal fade" role="dialog" aria-hidden="true" data-backdrop="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">
                                  【
                                  <span ng-bind="commonChargeDetail.charger_id"></span>
                                  】
                                所属白名单管理
                                </h4>
            </div>
            <div class="modal-body form">
                <div class="form-group">
                    <div class="table_btn_box">
                        <a class="btn blue" href="javascript:;" data-target="#offlineWhiteModel" data-toggle="modal" ng-click="addOfflineWhite();">
                            <i class="fa fa-plus"></i> 新增
                        </a>
                        <a ng-if="commonChargeDetail.protocol_version=='0201'" class="btn blue" ng-click="retrieveWhiteLists(commonChargeDetail.charger_id);">
                            <i class="fa fa-neuter"></i> 查询
                        </a>
                        <!--                                     <a class="btn blue" href="javascript:;"  ng-click="delOfflineWhite();">
                                      <i class="fa fa-times"></i>
                                      删除
                                    </a> -->
                    </div>
                    <table class="table table-striped table-bordered table-hover" id="table_2">
                        <thead>
                            <tr>
                                <th>用户卡号</th>
                                <th>是否使用</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr class="odd gradeX" ng-repeat="offlineWhite in offlineWhiteList  track by $index" on-loaded="{{$last}}" target-table="table_2">
                                <td>
                                    <span ng-bind="offlineWhite.user_pay_card"></span>
                                </td>
                                <td>
                                    <span ng-bind="offlineWhite.valid_flag  | getValueInStaticFilter : 'validArray'"></span>
                                </td>
                                <td>
                                    <a class="btn" href="javascript:;" ng-click="deleteOfflineWhite(offlineWhite);">删除</a>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-danger" data-dismiss="modal">
                    <i class="fa fa-times"></i> 关闭
                </button>
            </div>
        </div>
    </div>
</div>
<div id="offlineWhiteModel" class="modal fade" role="dialog" aria-hidden="true" data-backdrop="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <form class="form-horizontal w5c-form demo-form" role="form" w5c-form-validate="vm.validateOptions" novalidate name="validateForm">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="validateForm.reset()">×</button>
                    <h4 class="modal-title">白名单新增</h4>
                </div>
                <div class="modal-body form">
                    <div class="form-group">
                        <div class="row">
                            <label class="col-sm-2 control-label text-right"><span class="star-color">* </span>用户卡号</label>
                            <div class="col-sm-8">
                                <div class="input-group">
                                    <input type="text" class="form-control" ng-model="selectedOfflineWhite.user_pay_card" ng-readonly="'insert'!=modifyType" required="" ng-pattern="/^\d{20}$/" name="user_pay_card" />
                                </div>
                            </div>
                        </div>
                        <div class="row" ng-if="'insert'!=modifyType">
                            <label class="col-sm-2 control-label text-right">是否启用</label>
                            <div class="col-md-8">
                                <div class="radio-list">
                                    <label class="radio-inline col-md-4" style="margin:0px;padding: 0px">
                                        <input ng-model="selectedOfflineWhite.valid_flag" type="radio" value="1" ng-selected="selectedOfflineWhite.valid_flag==1">启用</label>
                                    <label class="radio-inline col-md-4" style="margin:0px;padding: 0px">
                                        <input ng-model="selectedOfflineWhite.valid_flag" type="radio" value="0" ng-selected="selectedOfflineWhite.valid_flag==0">停用</label>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-danger" data-dismiss="modal" ng-click="validateForm.reset()">
                        <i class="fa fa-times"></i> 关闭
                    </button>
                    <button type="button" class="btn btn-primary" w5c-form-submit="modifyOfflineWhite();">
                        <i class="fa fa-check"></i> 保存
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
<div id="splitratioSchemeList" class="modal fade" role="dialog" aria-hidden="true" data-backdrop="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">
                                  【
                                  <span ng-bind="commonChargeDetail.charger_id"></span>
                                  】
                                所属分成管理
                                </h4>
            </div>
            <div class="modal-body form">
                <div class="form-group">
                    <table class="table table-striped table-bordered table-hover" id="table_3">
                        <thead>
                            <tr>
                                <th>分成方案号</th>
                                <th>分成方案名</th>
                                <th>所属服务</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr class="odd gradeX" ng-repeat="splitratioScheme in splitratioSchemeList  track by $index" on-loaded="{{$last}}" target-table="table_3">
                                <td>
                                    <span ng-bind="splitratioScheme.scheme_no"></span>
                                </td>
                                <td>
                                    <span ng-bind="splitratioScheme.scheme_name | commonSubString"></span>
                                </td>
                                <td>
                                    <span ng-bind="splitratioScheme.service_no | getValueInStaticFilter:'orderServiceArray'"></span>
                                </td>
                                <td>
                                    <a class="btn" href="javascript:;" data-target="#splitratioSchemeModel" data-toggle="modal" ng-click="viewSplitratioScheme(splitratioScheme);">查看</a>
                                    <a class="btn" href="javascript:;" ng-click="relevanceSplitratioScheme(splitratioScheme,'allot');" ng-if="!splitratioScheme.isAllot&&'1'==splitratioScheme.valid_flag">分配</a>
                                    <a class="btn" href="javascript:;" ng-click="relevanceSplitratioScheme(splitratioScheme,'unAllot');" ng-if="!!splitratioScheme.isAllot&&'1'==splitratioScheme.valid_flag" style="background-color:#aaa">解绑</a>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-danger" data-dismiss="modal">
                    <i class="fa fa-times"></i> 关闭
                </button>
            </div>
        </div>
    </div>
</div>
<!-- <div id="retrieveChargingFee" class="modal fade" role="dialog" aria-hidden="true" data-backdrop="false" >
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"
          aria-hidden="true">×</button>
        <h4 class="modal-title">
          电桩充电费率查询
        </h4>
      </div>

      <div class="modal-body form">

        <div class="form-group">
          <table class="table table-striped table-bordered table-hover" id="table_3">
            <thead>
              <tr>
                <th>费率1</th>
                <th>费率2</th>
                <th>费率3</th>
                <th>费率4</th>
                <th>服务费</th>
              </tr>
            </thead>
            <tbody>
              <tr class="odd gradeX">
                <td>
                  <span ng-bind="retrieveChargingFeeData.rate1"></span>
                </td>
                <td>
                  <span ng-bind="retrieveChargingFeeData.rate2"></span>
                </td>
                <td>
                  <span ng-bind="retrieveChargingFeeData.rate3"></span>
                </td>
                <td>
                  <span ng-bind="retrieveChargingFeeData.rate4"></span>
                </td>
                <td>
                  <span ng-bind="retrieveChargingFeeData.serverFee"></span>
                </td>
              </tr>
              <tr class="odd gradeX">
                <td>
                  时间段
                </td>
                <td colspan="4">
                  <span ng-bind="retrieveChargingFeeData.timePeroid"></span>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-danger" data-dismiss="modal">
          <i class="fa fa-times"></i>
          关闭
        </button>
      </div>
    </div>
  </div>
</div> -->
<div id="splitratioSchemeModel" class="modal fade" role="dialog" aria-hidden="true" data-backdrop="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">分成方案详情</h4>
            </div>
            <div class="modal-body form">
                <div class="form-group">
                    <div class="row">
                        <label class="col-sm-2 control-label text-right">绑定服务</label>
                        <div class="col-sm-4">
                            <div class="input-group">
                                <span ng-bind="selectedSS.service_no | getValueInStaticFilter : 'serviceNoArray'"></span>
                            </div>
                        </div>
                        <label class="col-sm-2 control-label text-right">方案名</label>
                        <div class="col-sm-4">
                            <div class="input-group">
                                <span ng-bind="selectedSS.scheme_name"></span>
                            </div>
                        </div>
                    </div>
                    <div class="row"></div>
                    <hr />
                    <div ng-repeat="entity in entityList track by $index">
                        <div class="row">
                            <label class="col-sm-2 control-label text-right">归属类型</label>
                            <div class="col-sm-4">
                                <div class="radio-list">
                                    <span ng-bind="entity.entity_type | getValueInStaticFilter : 'entityTypeArray'"></span>
                                </div>
                            </div>
                            <label class="col-sm-2 control-label text-right">归属对象</label>
                            <div class="col-sm-4">
                                <div class="input-group">
                                    <span ng-bind="entity.entity_name"></span>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-sm-2 control-label text-right">分成比例</label>
                            <div class="col-sm-4">
                                <div class="input-group">
                                    <span ng-bind="entity.ratios"></span>
                                </div>
                            </div>
                            <label class="col-sm-2 control-label text-right">保底金额(元)</label>
                            <div class="col-sm-4">
                                <div class="input-group">
                                    <span ng-bind="entity.min_amount"></span>
                                </div>
                            </div>
                        </div>
                        <hr />
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-danger" data-dismiss="modal"><i class="fa fa-times"></i>关闭</button>
            </div>
        </div>
    </div>
</div>
<div id="chargerRateList" class="modal fade" role="dialog" aria-hidden="true" data-backdrop="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">
                                  【
                                  <span ng-bind="commonChargeDetail.charger_id"></span>
                                  】
                                所属费率管理
                                </h4>
            </div>
            <div class="modal-body form">
                <div class="form-group">
                    <table class="table table-striped table-bordered table-hover" id="table_4">
                        <thead>
                            <tr>
                                <th>方案号</th>
                                <th>方案名称</th>
                                <th>收费类型</th>
                                <th>费用类型</th>
                                <th>是否默认费率</th>
                                <th>是否有效</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr class="odd gradeX" ng-repeat="chargerRate in chargerRateList  track by $index" on-loaded="{{$last}}" target-table="table_4">
                                <td>
                                    <span ng-bind="chargerRate.rate_schema"></span>
                                </td>
                                <td>
                                    <span ng-bind="chargerRate.rate_name | commonSubString"></span>
                                </td>
                                <td>
                                    <span ng-bind="chargerRate.charge_mode | getValueInStaticFilter : 'chargeModeArray'"></span>
                                </td>
                                <td>
                                    <span ng-bind="chargerRate.fee_type | getValueInStaticFilter : 'feeTypeArray'"></span>
                                </td>
                                <td>
                                    <span ng-bind="chargerRate.default_ind  | getValueInStaticFilter : 'whetherArray'"></span>
                                </td>
                                <td>
                                    <span ng-bind="chargerRate.valid_flag  | getValueInStaticFilter : 'validArray'"></span>
                                </td>
                                <td>
                                    <a class="btn" href="javascript:;" data-target="#chargerRateModel" data-toggle="modal" ng-click="viewChargerRate(chargerRate);">查看</a>
                                    <a ng-if="!chargerRate.isAllot&&'1'==chargerRate.valid_flag" class="btn" href="javascript:;" ng-click="relevanceChargerRate(chargerRate,'allot');">绑定</a>
                                    <a class="btn" href="javascript:;" ng-if="!!chargerRate.isAllot&&'1'==chargerRate.valid_flag" style="background-color:#aaa;cursor: default;">已绑定</a>
                                    <!--                                           <a class="btn" href="javascript:;"  ng-click="relevanceChargerRate(chargerRate,'allot');"
                                          ng-if="!chargerRate.isAllot&&'1'==chargerRate.valid_flag">绑定</a>
                                          <a class="btn" href="javascript:;" ng-click="relevanceChargerRate(chargerRate,'unAllot');"
                                          ng-if="!!chargerRate.isAllot&&'1'==chargerRate.valid_flag"
                                          style="background-color:#aaa">解绑</a> -->
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-danger" data-dismiss="modal">
                    <i class="fa fa-times"></i> 关闭
                </button>
            </div>
        </div>
    </div>
</div>
<div id="chargerRateModel" class="modal fade" role="dialog" aria-hidden="true" data-backdrop="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">费率详情</h4>
            </div>
            <div class="modal-body form">
                <div class="form-group">
                    <div class="row not-bg">
                        <label class="col-sm-2 control-label text-right">方案名称</label>
                        <div class="col-sm-8">
                            <div class="input-group">
                                <span ng-bind="selectChargerRate.rate_name"></span>
                            </div>
                        </div>
                    </div>
                    <div class="row have-bg">
                        <label class="col-sm-2 control-label text-right">费用类型</label>
                        <div class="col-sm-8">
                            <div class="input-group">
                                <span ng-bind="selectChargerRate.fee_type | getValueInStaticFilter : 'feeTypeArray'"></span>
                            </div>
                        </div>
                    </div>
                    <div class="row not-bg">
                        <label class="col-sm-2 control-label text-right">收费类型</label>
                        <div class="col-sm-8">
                            <div class="input-group">
                                <span ng-bind="selectChargerRate.charge_mode | getValueInStaticFilter : 'chargeModeArray'"></span>
                            </div>
                        </div>
                    </div>
                    <div class="row have-bg" ng-if="selectChargerRate.fee_type!='2'&&selectChargerRate.charge_mode==1">
                        <label class="col-sm-2 control-label text-right">金额(元/次)</label>
                        <div class="col-sm-8">
                            <div class="input-group">
                                <span ng-bind="selectChargerRate.rate"></span>
                            </div>
                        </div>
                    </div>
                    <hr />
                    <div ng-repeat="timeInterval in timeIntervalArray track by $index" ng-if="selectChargerRate.charge_mode==0">
                        <div class="row">
                            <label class="col-sm-2 control-label text-right">开始时间</label>
                            <div class="col-sm-2">
                                <div class="input-group">
                                    <input type="text" class="form-control" ng-readonly="true" ng-model="timeInterval.startime" ng-readonly="true" />
                                </div>
                            </div>
                            <label class="col-sm-2 control-label text-right">结束时间</label>
                            <div class="col-sm-2">
                                <div class="input-group">
                                    <select class="form-control" ng-model="timeInterval.endTime" ng-options="endTimeObj.index as endTimeObj.time for endTimeObj in timeInterval.endTimeArray" ng-change="changeTimeInterval(timeInterval.endTime,$index)" style="padding: 0 0 0 5px;width:65px;" ng-disabled="true"></select>
                                </div>
                            </div>
                            <div class="">
                                <label class="col-sm-2 control-label text-right">金额(元)</label>
                                <div class="col-sm-2">
                                    <div class="input-group">
                                        <input type="text" class="form-control" ng-model="timeInterval.rate" ng-readonly="true" />
                                    </div>
                                </div>
                            </div>
                        </div>
                        <hr />
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-danger" data-dismiss="modal"><i class="fa fa-times"></i>关闭</button>
            </div>
        </div>
    </div>
</div>
<div id="dicForwardSrvList" class="modal fade" role="dialog" aria-hidden="true" data-backdrop="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">
                                  【
                                  <span ng-bind="commonChargeDetail.charger_id"></span>
                                  】
                                所属硬件服务器管理
                                </h4>
            </div>
            <div class="modal-body form">
                <div class="form-group">
                    <table class="table table-striped table-bordered table-hover" id="table_5">
                        <thead>
                            <tr>
                                <th>名称</th>
                                <th>编号</th>
                                <th>主ip</th>
                                <th>主硬件上报端口</th>
                                <th>备用ip</th>
                                <th>备用硬件上报端口</th>
                                <th>当前容量</th>
                                <th>最大容量</th>
                                <th>是否有效</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr class="odd gradeX" ng-repeat="dicForwardSrv in dicForwardSrvList  track by $index" on-loaded="{{$last}}" target-table="table_5">
                                <td>
                                    <span ng-bind="dicForwardSrv.forward_srv_name | commonSubString"></span>
                                </td>
                                <td>
                                    <span ng-bind="dicForwardSrv.forward_srv_id"></span>
                                </td>
                                <td>
                                    <span ng-bind="dicForwardSrv.main_hardware_ip"></span>
                                </td>
                                <td>
                                    <span ng-bind="dicForwardSrv.main_port_up"></span>
                                </td>
                                <td>
                                    <span ng-bind="dicForwardSrv.back_headware_ip"></span>
                                </td>
                                <td>
                                    <span ng-bind="dicForwardSrv.back_port_up"></span>
                                </td>
                                <td>
                                    <span ng-bind="dicForwardSrv.current_capacity"></span>
                                </td>
                                <td>
                                    <span ng-bind="dicForwardSrv.capacity"></span>
                                </td>
                                <td>
                                    <span ng-bind="dicForwardSrv.valid_flag  | getValueInStaticFilter : 'validArray'"></span>
                                </td>
                                <td>
                                    <a class="btn" href="javascript:;" data-target="#dicForwardSrvModel" data-toggle="modal" ng-click="viewDicForwardSrv(dicForwardSrv);">查看</a>
                                    <a class="btn" href="javascript:;" ng-click="relevanceDicForwardSrv(dicForwardSrv,'allot');" ng-if="!dicForwardSrv.isAllot&&'1'==dicForwardSrv.valid_flag">绑定</a>
                                    <a class="btn" href="javascript:;" ng-click="relevanceDicForwardSrv(dicForwardSrv,'unAllot');" ng-if="!!dicForwardSrv.isAllot&&'1'==dicForwardSrv.valid_flag" style="background-color:#aaa">解绑</a>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-danger" data-dismiss="modal">
                    <i class="fa fa-times"></i> 关闭
                </button>
            </div>
        </div>
    </div>
</div>
<div id="dicForwardSrvModel" class="modal fade" role="dialog" aria-hidden="true" data-backdrop="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">桩硬件服务器详情</h4>
            </div>
            <div class="modal-body form">
                <div class="form-group">
                    <div class="row">
                        <label class="col-sm-2 control-label text-right">名称</label>
                        <div class="col-sm-8">
                            <div class="input-group">
                                <span ng-bind="selectedDFS.forward_srv_name"></span>
                            </div>
                        </div>
                    </div>
                    <div class="row have-bg">
                        <label class="col-sm-2 control-label text-right">主ip</label>
                        <div class="col-sm-8">
                            <div class="input-group">
                                <span ng-bind="selectedDFS.main_hardware_ip"></span>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <label class="col-sm-2 control-label text-right">主上报端口</label>
                        <div class="col-sm-8">
                            <div class="input-group">
                                <span ng-bind="selectedDFS.main_port_up"></span>
                            </div>
                        </div>
                    </div>
                    <div class="row have-bg">
                        <label class="col-sm-2 control-label text-right">备用ip</label>
                        <div class="col-sm-8">
                            <div class="input-group">
                                <span ng-bind="selectedDFS.back_headware_ip"></span>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <label class="col-sm-2 control-label text-right">备用上报端口</label>
                        <div class="col-sm-8">
                            <div class="input-group">
                                <span ng-bind="selectedDFS.back_port_up"></span>
                            </div>
                        </div>
                    </div>
                    <div class="row have-bg">
                        <label class="col-sm-2 control-label text-right">主下发端口</label>
                        <div class="col-sm-8">
                            <div class="input-group">
                                <span ng-bind="selectedDFS.main_port_down"></span>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <label class="col-sm-2 control-label text-right">备用下发端口</label>
                        <div class="col-sm-8">
                            <div class="input-group">
                                <span ng-bind="selectedDFS.back_port_down"></span>
                            </div>
                        </div>
                    </div>
                    <div class="row have-bg">
                        <label class="col-sm-2 control-label text-right">当前容量</label>
                        <div class="col-sm-8">
                            <div class="input-group">
                                <span ng-bind="selectedDFS.current_capacity"></span>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <label class="col-sm-2 control-label text-right">最大容量</label>
                        <div class="col-sm-8">
                            <div class="input-group">
                                <span ng-bind="selectedDFS.capacity"></span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-danger" data-dismiss="modal"><i class="fa fa-times"></i>关闭</button>
            </div>
        </div>
    </div>
</div>
<div id="stationList" class="modal fade" role="dialog" aria-hidden="true" data-backdrop="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">
                                【
                                <span ng-bind="commonChargeDetail.charger_id"></span>】
                                所属站点管理
                                </h4>
            </div>
            <div class="modal-body form">
                <div class="form-group">
                    <table class="table table-striped table-bordered table-hover" id="table_6">
                        <thead>
                            <tr>
                                <th>站点编号</th>
                                <th>名称</th>
                                <th>所在地区</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr class="odd gradeX" ng-repeat="station in stationList  track by $index" on-loaded="{{$last}}" target-table="table_6">
                                <td>
                                    <span ng-bind="station.station_id"></span>
                                </td>
                                <td>
                                    <span ng-bind="station.station_name"></span>
                                </td>
                                <td>
                                    <span ng-bind="station.district_name"></span>
                                </td>
                                <td>
                                    <a class="btn" href="javascript:;" data-target="#stationModel" data-toggle="modal" ng-click="viewStationForCharger(station.station_id);">
                                                查看
                                            </a>
                                    <a class="btn" href="javascript:;" ng-click="relevanceStation(station);">
                                                绑定
                                            </a>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-danger" data-dismiss="modal">
                    <i class="fa fa-times"></i>关闭
                </button>
            </div>
        </div>
    </div>
</div>
<div id="stationModel" class="modal fade" role="dialog" aria-hidden="true" data-backdrop="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" ng-click="restoreSourcePo();" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">电站信息详情</h4>
            </div>
            <div class="modal-body form">
                <div class="form-group">
                    <div class="row">
                        <label class="col-sm-2 control-label text-right">站点名称</label>
                        <div class="col-sm-4">
                            <div class="input-group">
                                <span ng-bind="stationDetailInfo.station_name"></span>
                            </div>
                        </div>
                        <label class="col-sm-2 control-label text-right">站点充电类型</label>
                        <div class="col-sm-4">
                            <div class="input-group">
                                <span ng-bind="stationDetailInfo.station_type | getValueInStaticFilter : 'chargerTypeArray'"></span>
                            </div>
                        </div>
                    </div>
                    <div class="row have-bg">
                        <label class="col-sm-2 control-label text-right">详细地址</label>
                        <div class="col-sm-4">
                            <div class="input-group">
                                <span ng-bind="stationDetailInfo.address"></span>
                            </div>
                        </div>
                        <label class="col-sm-2 control-label text-right">所在商圈/楼盘</label>
                        <div class="col-sm-4">
                            <span ng-bind="stationDetailInfo.circle"></span>
                        </div>
                    </div>
                    <div class="row">
                        <label class="col-sm-2 control-label text-right">支持对外开放</label>
                        <div class="col-sm-4">
                            <div class="input-group">
                                <span ng-bind="stationDetailInfo.is_allow_open | getValueInStaticFilter : 'whetherArray'"></span>
                            </div>
                        </div>
                    </div>
                    <div class="row have-bg">
                        <label class="col-sm-2 control-label text-right">充电运营服务商</label>
                        <div class="col-sm-4">
                            <div class="input-group">
                                <span ng-bind="stationDetailInfo.oper_name"></span>
                            </div>
                        </div>
                        <label class="col-sm-2 control-label text-right">合作商</label>
                        <div class="col-sm-4">
                            <div class="input-group">
                                <span ng-bind="stationDetailInfo.name"></span>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <label class="col-sm-2 control-label text-right">建立时间</label>
                        <div class="col-sm-4">
                            <div class="input-group">
                                <span ng-bind="stationDetailInfo.establish_time | date:'yyyy-MM-dd'"></span>
                            </div>
                        </div>
                        <label class="col-sm-2 control-label text-right">站点描述</label>
                        <div class="col-sm-4">
                            <div class="input-group">
                                <span ng-bind="stationDetailInfo.describes"></span>
                            </div>
                        </div>
                    </div>
                    <div class="row have-bg">
                        <label class="col-sm-2 control-label text-right">停车处位置</label>
                        <div class="col-sm-4">
                            <div class="input-group">
                                <span ng-bind="stationDetailInfo.parking_type | getValueInStaticFilter : 'parkingTypeArray'"></span>
                            </div>
                        </div>
                        <label class="col-sm-2 control-label text-right">所在位置</label>
                        <div class="col-sm-4">
                            <span ng-bind="stationDetailInfo.parking_addr"></span>
                        </div>
                    </div>
                    <div class="row">
                        <label class="col-sm-2 control-label text-right">所在城市</label>
                        <div class="col-sm-10" style="padding-left: 7px">
                            <div class="input-group" style="width: auto;">
                                <span ng-bind="stationDetailInfo.district_name"></span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-danger" data-dismiss="modal"><i class="fa fa-times"></i>关闭</button>
            </div>
        </div>
    </div>
</div>
<script>
$('.getTime').datetimepicker({
    language: 'zh-CN',
    pickTime: false,
    todayBtn: true,
    autoclose: true,
    minView: '2',
    forceParse: false,
    format: "yyyy-mm-dd"
});
</script>
